
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PROTOCOLS.CFG</TITLE>
</HEAD><BODY>
<H1>PROTOCOLS.CFG</H1>
Section: File Formats (5)<BR>Updated: Version 4.3.13:  7 Jan 2014<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

protocols.cfg - Configuration of TCP network services
<P>
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>$XYMONHOME/etc/protocols.cfg</B>

<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

<B>protocols.cfg</B> contains definitions of how 
<I><A HREF="../man1/xymonnet.1.html">xymonnet</A>(1)</I>

should test a TCP-based network service (i.e. all common
network services except HTTP and DNS).
For each service, a simple dialogue can be defined to
check that the service is functioning normally, and optional
flags determine if the service has e.g. a banner or requires
SSL- or telnet-style handshaking to be tested.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>FILE FORMAT</H2>

protocols.cfg is a text file. A simple service definition for
the SMTP service would be this:
<BR>

<P>
<BR>&nbsp;&nbsp;&nbsp;[smtp]
<BR>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;send&nbsp;&quot;mail\r\nquit\r\n&quot;
<BR>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expect&nbsp;&quot;220&quot;
<BR>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options&nbsp;banner
<BR>

<P>
This defines a service called &quot;smtp&quot;. When the connection is
first established, xymonnet will send the string &quot;mail\r\nquit\r\n&quot;
to the service. It will then expect a response beginning with &quot;220&quot;.
Any data returned by the service (a so-called &quot;banner&quot;) will be recorded 
and included in the status message.
<P>
The full set of commands available for the protocols.cfg file are:
<P>
<DL COMPACT>
<DT>[NAME]<DD>
Define the name of the TCP service, which will also be the column-name
in the resulting display on the test status. If multiple tests share 
a common definition (e.g. ssh, ssh1 and ssh2 are tested identically),
you may list these in a single &quot;[ssh|ssh1|ssh2]&quot; definition,
separating each service-name with a pipe-sign.
<P>
<DT>send STRING<DD>
<DT>expect STRING<DD>
Defines the strings to send to the service after a connection is
established, and the response that is expected. Either of these
may be omitted, in which case
<I><A HREF="../man1/xymonnet.1.html">xymonnet</A>(1)</I>

will simply not send any data, or match a response against anything.
<P>
The send- and expect-strings use standard escaping for non-printable
characters. &quot;\r&quot; represents a carriage-return (ASCII 13), &quot;\n&quot;
represents a line-feed (ASCII 10), &quot;\t&quot; represents a TAB (ASCII 8). 
Binary data is input as &quot;\xNN&quot; with NN being the hexadecimal value
of the byte.
<P>
<DT>port NUMBER<DD>
Define the default TCP port-number for this service. If no portnumber
is defined,
<I><A HREF="../man1/xymonnet.1.html">xymonnet</A>(1)</I>

will attempt to lookup the portnumber in the standard /etc/services 
file.
<P>
<DT>options option1[,option2][,option3]<DD>
Defines test options. The possible options are
<BR>

<BR>&nbsp;&nbsp;&nbsp;banner&nbsp;-&nbsp;include&nbsp;received&nbsp;data&nbsp;in&nbsp;the&nbsp;status&nbsp;message
<BR>

<BR>&nbsp;&nbsp;&nbsp;ssl&nbsp;-&nbsp;service&nbsp;uses&nbsp;SSL&nbsp;so&nbsp;perform&nbsp;an&nbsp;SSL&nbsp;handshake
<BR>

<BR>&nbsp;&nbsp;&nbsp;telnet&nbsp;-&nbsp;service&nbsp;is&nbsp;telnet,&nbsp;so&nbsp;exchange&nbsp;telnet&nbsp;options
<P>
<P>
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>FILES</H2>

<B>$XYMONHOME/etc/protocols.cfg</B>

<P>
<A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2>

<A HREF="../man1/xymonnet.1.html">xymonnet</A>(1)
<P>
<P>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">FILE FORMAT</A><DD>
<DT><A HREF="#lbAF">FILES</A><DD>
<DT><A HREF="#lbAG">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 09:25:34 GMT, January 07, 2014
</BODY>
</HTML>
